/*
 * @Author: zhangshu
 * @email: shiliang.zhang@tuya.com
 * @LastEditors: Please set LastEditors
 * @file name: app_led_callback.c
 * @Description: 
 * @Copyright: HANGZHOU TUYA INFORMATION TECHNOLOGY CO.,LTD
 * @Company: http://www.tuya.com
 * @Date: 2022-02-08
 * @LastEditTime: 2022-02-08
 */
#include "app_common.h"
#include "app_led.h"
#include "tal_network_mgr.h"

/**
 * @description: led blink complete callback
 * @param[in] type: blink type, refer to LED_BLINK_TYPE_E
 * @return: none
 */
 VOID_T led_blink_complete_callback(LED_BLINK_TYPE_E type)
{
    switch (type) {
        
        case LED_BLINK_TYPE_POWER_ON:
        case LED_BLINK_TYPE_JOIN_SUCCESS: {
            if (TAL_ZG_NWK_JOIN_START == tal_zg_nwk_status_get()) {
                dev_start_join_indicate(TRUE);
            }
            break;
        }
        case LED_BLINK_TYPE_BUTTON_DOWN:
        case LED_BLINK_TYPE_IDENTIFY: {
            break;
        }
        case LED_BLINK_TYPE_START_JOIN: {
            USER_PR_DEBUG("join led timeout\r\n");
            break;
        }
        case LED_BLINK_TYEP_ALARM: {
            USER_PR_DEBUG("alarm indicate complete\r\n");
            break;
        }
        case LED_BLINK_TYEP_TAMPER: {
            USER_PR_DEBUG("tamper indicate complete\r\n");
            break;
        }
        default:
            break;
    }
}

